package cap4;

class TMinMax{
	//Atributos de instancia
	private float minima;
	private float maxima;
	//Constructor 
	public TMinMax (float mi,float ma){
	//Requiere ma >= mi
	  minima = mi;
	  maxima = ma;}
	//Comandos
	public void establecerMin(float m){
	  minima = m;}
	public void establecerMax(float m){
	  maxima = m;}
	//Consultas
	public float obtenerMin(){
	  return minima;}
	public float obtenerMax(){
	  return maxima;}
	public float promedio(){
	  return (minima+maxima)/2;}
	public float amplitudTermina(){
	  return maxima-minima;}
	public boolean equals(TMinMax r){
	  return minima == r.obtenerMin() && 
	         maxima == r.obtenerMax();}}
